-- GENERATED SPELL FOR [Wyrmcult Zealot] --


function spell0_21382(pUnit, Event) --@Blessing of the Black,Self--
pUnit:FullCastSpellOnTarget(37635,pUnit)
pUnit:RegisterEvent('Sorts_21382', 4100, 1)
end

function spell1_21382(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_21382', 579, 1)
end

function spell2_21382(pUnit, Event) --@Fire Nova,Self--
pUnit:FullCastSpellOnTarget(11969,pUnit)
pUnit:RegisterEvent('Sorts_21382', 2000, 1)
end

function spell3_21382(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21382', 3000, 1)
end

function Sorts_21382(pUnit, Event)
local choix_sorts_21382 = math.random(0, 3)
if choix_sorts_21382 == 0 then
pUnit:RegisterEvent('spell0_21382', 1, 1)
end
if choix_sorts_21382 == 1 then
pUnit:RegisterEvent('spell1_21382', 1, 1)
end
if choix_sorts_21382 == 2 then
pUnit:RegisterEvent('spell2_21382', 1, 1)
end
if choix_sorts_21382 == 3 then
pUnit:RegisterEvent('spell3_21382', 1, 1)
end
end

function mob21382_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21382', math.random(1500, 3000), 1)
end

function mob21382_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21382_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21382_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21382, 1, 'mob21382_Action')
RegisterUnitEvent(21382, 2, 'mob21382_Leave')
RegisterUnitEvent(21382, 3, 'mob21382_Kill')
RegisterUnitEvent(21382, 4, 'mob21382_Die')
